import axios from "@/tool/axios"
// 登录
export const login = (obj) => axios.post("login", obj)
// 左侧菜单
export const menus=()=>axios.get("menus")
// 用户列表
export const getUsers=(obj)=>axios.get("users",{
    params:obj
})
// 添加用户
export const addUsers = (obj) => axios.post("users",obj)
// 删除单个用户
export const del = (id) => axios.delete(`users/${id}`)
// 修改用户
export const xuUser = (id, obj) => axios.put(`users/${id}`,obj)
//修改用户状态
export const xuStatus = (uid,type) => axios.put(`users/${uid}/state/${type}`)
//分排角色
export const setRole = (id,rid) => axios.put(`users/${id}/role`,{rid})